import request from "@/request/request";
// 全站检索查询-资讯和金融产品
export function getSearch(params) {
  return request({
    url: "/dev-api/system/lucene/search",
    method: "get",
    params,
  });
}
// 用户菜单
export function getUserMenu(params) {
  return request({
    url: "/dev-api/system/userAndMeun/userMenu",
    method: "get",
    params,
  });
}
//全站检索查询-服务
export function searchService(params) {
  return request({
    url: "/dev-api/system/menu/findSc",
    method: "get",
    params,
    headers: {
      enterprise_id: "1581868639098753026",
      source_name: "25dea081aeb34f8e88f467a3306c33fa",
    },
  });
}
//获取字典值
export function keyVal(type) {
  return request({
    url: "/dev-api/auth/type/" + type,
    method: "get",
  });
}
// 友情链接
export function exchangeLink(params) {
  return request({
    url: "/dev-api/system/link/listLink",
    method: "get",
    params,
    headers: {
      enterprise_id: "1581868639098753026",
      source_name: "25dea081aeb34f8e88f467a3306c33fa",
    },
  });
}
// 新建链接
export function friendlyAdd(data) {
  return request({
    url: "/dev-api/system/link",
    method: "post",
    data,
  });
}
// 修改链接
export function friendlyivateEdit(data) {
  return request({
    url: "/dev-api/system/link",
    method: "put",
    data,
  });
}
// 删除链接
export function friendlyDelete(id) {
  return request({
    url: "/dev-api/system/link/batch/" + id,
    method: "delete",
  });
}
// 链接列表
export function friendlyList(params) {
  return request({
    url: "/dev-api/system/link/list/",
    method: "get",
    params,
  });
}
// 链接详情
export function friendlyDetail(id) {
  return request({
    url: "/dev-api/system/link/" + id,
    method: "get",
  });
}


// 获取机构信息详情（传用户id）
export function obtainInstitutional(params) {
  return request({
    url: "/dev-api/system/company/examineInfo" ,
    method: "get",
    params
  });
}

// 上传图片地址
export function getUploadImg(data) {
  return request({
    url: "/dev-api/file/upload/uploadNotQR" ,
    method: "post",
    data
  });
}
// 发布需求列表
export function sendNeed(params) {
  return request({
    url: "/dev-api/system/demand/list",
    method: "get",
    params,
    headers: {
      enterprise_id: "1581868639098753026",
      source_name: "25dea081aeb34f8e88f467a3306c33fa",
    },
  });
}
//查询企业
export function searchCompany(params) {
  return request({
    url: "/dev-api/system/register/NList",
    method: "get",
    params,
    headers: {
      enterprise_id: "1581868639098753026",
      source_name: "25dea081aeb34f8e88f467a3306c33fa",
    },
  });
}
// 文件下载
export function fileDownload(params) {
  return request({
    url: "/dev-api/file/download",
    method: "get",
    params,
    responseType: "blob",
  });
}
